/*******************************************************************************
PaddleControllerPlayer.cpp

Notes:
*******************************************************************************/

#include "PaddleControllerPlayer.h"

//	PaddleControllerPlayer(void)
//		Initializes the paddle controller
PaddleControllerPlayer::PaddleControllerPlayer(void)
{
	// Initialize the move direction to zero
	m_iMoveDirection = 0;
} // PaddleControllerPlayer

//	Update(const sf::Input& input)
//		Updates the state based on user input
//			input - The user input
void PaddleControllerPlayer::Update(const sf::Input& input)
{
	// If the up key is pressed...
	if(input.IsKeyDown(sf::Key::Up))
	{
		// Set the move direction to up
		m_iMoveDirection = -1;
	} // if
	// Otherwise, if the down key is pressed...
	else if(input.IsKeyDown(sf::Key::Down))
	{
		// Set the move direction to down
		m_iMoveDirection = 1;
	} // else if
	// Otherwise...
	else
	{
		// ... set the move direction zero (no movement)
		m_iMoveDirection = 0;
	} // else
} // Update

//	GetMoveDirection(void)
//		Gets the move direction
int PaddleControllerPlayer::GetMoveDirection(void)
{
	// Return the move direction
	return m_iMoveDirection;
} // GetMoveDirection